package org.weso.acota.services;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.weso.acota.appserv.FeedbackAppServ;
import org.weso.acota.to.feedback.FeedbackResource;
import org.weso.acota.to.feedback.FeedbackTag;

public class AcotaFeedBackImpl implements AcotaFeedbackServiceFacade {
	
	private FeedbackAppServ feedbackservice;
	
	public AcotaFeedBackImpl(){
		this.feedbackservice = new FeedbackAppServ();
	}

	public String saveSuggestions(String user, String activity, Date taggingDate,
			String resourceUri, String resourceLabel,
			String resourceDescription, List<FeedbackTag> tags) {
		String docUri = "";
		docUri = feedbackservice.saveSuggestions(user, activity, taggingDate, resourceUri, resourceLabel, resourceDescription, tags);
		return docUri;
	}
	
//	public String saveSuggest(String user, String activity, Date taggingDate,
//			String resourceUri, String resourceLabel,
//			String resourceDescription, List<FeedbackTag> tags) {
//		String docUri = "";
//		docUri = feedbackservice.saveSuggestions(user, activity, taggingDate, resourceUri, resourceLabel, resourceDescription, tags);
//		return docUri;
//	}

	public List<FeedbackTag> getUserTags(String username) {
		List<FeedbackTag> tags = new ArrayList<FeedbackTag>();
		tags = feedbackservice.getUserTags(username);
		return tags;
	}

	public List<FeedbackTag> getDocumentTags(String documentUri) {
		List<FeedbackTag> tags = new ArrayList<FeedbackTag>();
		tags = feedbackservice.getDocumentTags(documentUri);
		return tags;
	}

	public List<FeedbackResource> getTaggedDocuments(String label) {
		List<FeedbackResource> documents = new ArrayList<FeedbackResource>();
		documents = feedbackservice.getTaggedDocuments(label);
		return documents;
	}

}
